package com.manager.managersystem.controller;


import com.manager.managersystem.entity.User;
import com.manager.managersystem.service.IUserService;
import com.manager.managersystem.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author mao
 * @since 05-04
 */
@RestController
@RequestMapping("/api/user")
public class UserController {

    @Resource
    private IUserService userService;

    @GetMapping("/listAll")
    public Result<List<User>> getUser() {
        List<User> userList = userService.listAll();
        return Result.ok(userList);
    }
}

